<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Verb Usages</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
MathJax = {
	tex: {
		inlineMath: '$', '$'], ['\\(', '\\)'
	},
	svg: {
		fontCache: 'global'
	}
};
</script>
<script type="text/javascript" id="MathJax-script" async
	src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
</script>

<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Verb Usages' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../services.html">Services</a></li><li><a href="index.html">linguistics</a></li><li><a href="index.html#3">Chapter 3: VP Categories</a></li><li><b>Verb Usages</b></li></ul></div>
<p class="purpose">To parse the many forms a verb can take.</p>

<ul class="toc"><li><a href="3-vu.html#SP1">&#167;1. Verb usages</a></li><li><a href="3-vu.html#SP3">&#167;3. Search list and tiers</a></li><li><a href="3-vu.html#SP5">&#167;5. Creation</a></li><li><a href="3-vu.html#SP6">&#167;6. Registration of regular verbs</a></li><li><a href="3-vu.html#SP11">&#167;11. Miscellaneous utility routines</a></li><li><a href="3-vu.html#SP13">&#167;13. Parsing source text against verb usages</a></li><li><a href="3-vu.html#SP23">&#167;23. Optimisation</a></li><li><a href="3-vu.html#SP24">&#167;24. Adaptive person</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. Verb usages.</b>We already have the ability to conjugate verbs &mdash; to turn "to have" into "I have",
"you have", "he has", "they have had", "we will have" and so on &mdash; from the
<a href="../inflections-module/index.html" class="internal">inflections</a> module. However, we won't necessarily want to recognise all of
those forms in sentences in the source text. For example, Inform only looks
at present tense forms of verbs in the third person, or at imperative forms.
</p>

<p class="commentary">To be recognised as referring to a given verb, a conjugated form of it must
be turned into one of the following structures:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">grammatical_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">usage</span><span class="plain-syntax">;        </span><span class="comment-syntax"> includes verb, voice, tense, sense</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">word_assemblage</span><span class="plain-syntax"> </span><span class="identifier-syntax">vu_text</span><span class="plain-syntax">;         </span><span class="comment-syntax"> text to recognise</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">vu_allow_unexpected_upper_case</span><span class="plain-syntax">;     </span><span class="comment-syntax"> for verbs like "to Hoover" or "to Google"</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">next_in_search_list</span><span class="plain-syntax">; </span><span class="comment-syntax"> within a linked list of all usages in length order</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">next_within_tier</span><span class="plain-syntax">;    </span><span class="comment-syntax"> within the linked list for this tier (see below)</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">where_vu_created</span><span class="plain-syntax">;    </span><span class="comment-syntax"> for use if problem messages needed</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">linguistic_stock_item</span><span class="plain-syntax"> *</span><span class="identifier-syntax">in_stock</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu_lex_entry</span><span class="plain-syntax">;  </span><span class="comment-syntax"> for use when indexing</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CLASS_DEFINITION</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>The structure verb_usage is accessed in 2/adj, 2/art, 2/daq, 2/nns, 2/prn, 3/vrb, 3/prp, 4/vp and here.</li></ul>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::write_usage</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::write_usage</span></span>:<br/>Diagrams - <a href="1-dgr.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vu</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) { </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"(null verb usage)"</span><span class="plain-syntax">); </span><span class="reserved-syntax">return</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">" {verb"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb</span><span class="plain-syntax"> *</span><span class="identifier-syntax">V</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP12" class="function-link"><span class="function-syntax">VerbUsages::get_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">V</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">" '%A'"</span><span class="plain-syntax">, &amp;(</span><span class="identifier-syntax">V</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">conjugation</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">infinitive</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><a href="1-sc.html#SP9" class="function-link"><span class="function-syntax">Stock::write_usage</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">usage</span><span class="plain-syntax">, </span><span class="identifier-syntax">SENSE_LCW</span><span class="plain-syntax">+</span><span class="identifier-syntax">VOICE_LCW</span><span class="plain-syntax">+</span><span class="identifier-syntax">TENSE_LCW</span><span class="plain-syntax">+</span><span class="identifier-syntax">PERSON_LCW</span><span class="plain-syntax">+</span><span class="identifier-syntax">NUMBER_LCW</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"}"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::log_all</span><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">preposition</span><span class="plain-syntax"> *</span><span class="identifier-syntax">prep</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOG</span><span class="plain-syntax">(</span><span class="string-syntax">"The current S-grammar has the following verb and preposition usages:\n"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">, </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-vu.html#SP2" class="function-link"><span class="function-syntax">VerbUsages::write_usage</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">DL</span><span class="plain-syntax">, </span><span class="identifier-syntax">vu</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOG</span><span class="plain-syntax">(</span><span class="string-syntax">"\n"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">prep</span><span class="plain-syntax">, </span><span class="reserved-syntax">preposition</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOG</span><span class="plain-syntax">(</span><span class="string-syntax">"$p\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">prep</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. Search list and tiers.</b>A "search list" of verb usages indicates what order the possibilities should be
checked in. The simpler list is in order of word count:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu_search_list</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">; </span><span class="comment-syntax"> head of linked list of usages in length order</span>
</pre>
<pre class="definitions code-font"><span class="definition-keyword">define</span> <span class="identifier-syntax">LOOP_OVER_USAGES</span><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vu</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vu_search_list</span><span class="plain-syntax">; </span><span class="identifier-syntax">vu</span><span class="plain-syntax">; </span><span class="identifier-syntax">vu</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_in_search_list</span><span class="plain-syntax">)</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>The more complex list involves "tiers" of verbs with different priorities.
</p>

<p class="commentary">A particular challenge of parsing natural language is to decide the most likely
word in a sentence to be its primary verb. (The verb in "Heatwave Bone Breaks
Clog Hospital" is not "to break".) This is especially challenging when the
noun phrases can't be understood since they refer to things not yet created.
In Inform, for example, "Peter wears a felt hat" might be the only reference
anywhere in the source text to either Peter or the hat, which must each be
created in response to this sentence, and therefore can't be used to
understand it.
</p>

<p class="commentary">The model we use is to sort verb usages into "tiers", each with a numerical
"priority", which is a non-negative number. Tier 0 verb usages are never
recognised. (This does not make them useless: Inform can generate adaptive
text using them, and they can exist as run-time values in Inform.) Otherwise,
the lower the priority number, the more likely it is that this verb is meant.
If two usages belong to the same tier, the earlier in a sentence is preferred.
</p>

<p class="commentary">The tiers are stored as a linked list, in priority order:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">verb_usage_tier</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">priority</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">tier_contents</span><span class="plain-syntax">; </span><span class="comment-syntax"> head of linked list for this tier</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">verb_usage_tier</span><span class="plain-syntax"> *</span><span class="identifier-syntax">next_tier</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CLASS_DEFINITION</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">verb_usage_tier</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">verb_usage_tier</span><span class="plain-syntax"> *</span><span class="identifier-syntax">first_search_tier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">; </span><span class="comment-syntax"> head of linked list of tiers</span>
</pre>
<ul class="endnotetexts"><li>The structure verb_usage_tier is accessed in 4/vp and here.</li></ul>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. Creation.</b>Here we create a single verb usage; note that the empty text cannot be used.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">current_main_verb</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="function-syntax">VerbUsages::new</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::new</span></span>:<br/><a href="3-vu.html#SP7_1_3">&#167;7.1.3</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">word_assemblage</span><span class="plain-syntax"> </span><span class="identifier-syntax">wa</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">unexpected_upper_casing_used</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">grammatical_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">usage</span><span class="plain-syntax">, </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">where</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordAssemblages::nonempty</span><span class="plain-syntax">(</span><span class="identifier-syntax">wa</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">VERB_USAGES</span><span class="plain-syntax">, </span><span class="string-syntax">"new usage: '%A'\n"</span><span class="plain-syntax">, &amp;</span><span class="identifier-syntax">wa</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-vu.html#SP23" class="function-link"><span class="function-syntax">VerbUsages::mark_as_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">WordAssemblages::first_word</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">wa</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CREATE</span><span class="plain-syntax">(</span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">vu_text</span><span class="plain-syntax"> = </span><span class="identifier-syntax">wa</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">vu_lex_entry</span><span class="plain-syntax"> = </span><span class="identifier-syntax">current_main_verb</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">where_vu_created</span><span class="plain-syntax"> = </span><span class="identifier-syntax">where</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">usage</span><span class="plain-syntax"> = </span><span class="identifier-syntax">usage</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">vu_allow_unexpected_upper_case</span><span class="plain-syntax"> = </span><span class="identifier-syntax">unexpected_upper_casing_used</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_within_tier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_in_search_list</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-vu.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Add to the length-order search list</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5_1" class="paragraph-anchor"></a><b>&#167;5.1. </b>These are insertion-sorted into a list in decreasing order of word count,
with oldest first in the case of equal length:
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Add to the length-order search list</span><span class="named-paragraph-number">5.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vu_search_list</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="identifier-syntax">vu_search_list</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">evu</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vu_search_list</span><span class="plain-syntax">, *</span><span class="identifier-syntax">prev</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">; </span><span class="identifier-syntax">evu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">prev</span><span class="plain-syntax"> = </span><span class="identifier-syntax">evu</span><span class="plain-syntax">, </span><span class="identifier-syntax">evu</span><span class="plain-syntax"> = </span><span class="identifier-syntax">evu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_in_search_list</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordAssemblages::longer</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">wa</span><span class="plain-syntax">, &amp;(</span><span class="identifier-syntax">evu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">vu_text</span><span class="plain-syntax">)) &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_in_search_list</span><span class="plain-syntax"> = </span><span class="identifier-syntax">evu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">prev</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="identifier-syntax">vu_search_list</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">prev</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_in_search_list</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">evu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_in_search_list</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">evu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_in_search_list</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-vu.html#SP5">&#167;5</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. Registration of regular verbs.</b>It would be tiresome to have to call the above routine for every possible
conjugated form of a verb individually, so the following takes care of
a whole verb at once.
</p>

<p class="commentary">The copular verb has no passive, since it doesn't distinguish between
subject and object. In English, we can say "the hat is worn by Peter"
as equivalent to "Peter wears the hat", but not "1 is been by X" as
equivalent to "X is 1".
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">regular_to_be</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">; </span><span class="comment-syntax"> "is"</span>
<span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">negated_to_be</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">; </span><span class="comment-syntax"> "is not"</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::register_all_usages_of_verb</span><span class="plain-syntax">(</span><span class="reserved-syntax">verb</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vi</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">unexpected_upper_casing_used</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">priority</span><span class="plain-syntax">, </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">where</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vc</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vi</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">conjugation</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vc</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">current_main_verb</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vc</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><a href="3-vu.html#SP7" class="function-link"><span class="function-syntax">VerbUsages::register_voices_of_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">, </span><span class="identifier-syntax">ACTIVE_VOICE</span><span class="plain-syntax">, </span><span class="identifier-syntax">vi</span><span class="plain-syntax">,</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">unexpected_upper_casing_used</span><span class="plain-syntax">, </span><span class="identifier-syntax">priority</span><span class="plain-syntax">, </span><span class="identifier-syntax">where</span><span class="plain-syntax">);</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vi</span><span class="plain-syntax"> != </span><span class="identifier-syntax">copular_verb</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-vu.html#SP7" class="function-link"><span class="function-syntax">VerbUsages::register_voices_of_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">, </span><span class="identifier-syntax">PASSIVE_VOICE</span><span class="plain-syntax">, </span><span class="identifier-syntax">vi</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">unexpected_upper_casing_used</span><span class="plain-syntax">, </span><span class="identifier-syntax">priority</span><span class="plain-syntax">, </span><span class="identifier-syntax">where</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="3-vu.html#SP6_1" class="named-paragraph-link"><span class="named-paragraph">Add present participle forms</span><span class="named-paragraph-number">6.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6_1" class="paragraph-anchor"></a><b>&#167;6.1. </b>With the present participle the meaning is back the right way around: for
instance, "to be fetching" has the same meaning as "to fetch". At any rate,
Inform's linguistic model is not subtle enough to distinguish the difference,
in terms of a continuous rather than instantaneous process, which a human
reader might be aware of.
</p>

<p class="commentary">Partly because of that, we don't allow these forms for the copular verb:
"He is being difficult" doesn't quite mean "He is difficult", which is the
best sense we could make of it, and "He is being in the Dining Room" has
an awkward sound to it.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Add present participle forms</span><span class="named-paragraph-number">6.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordAssemblages::nonempty</span><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">present_participle</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">preposition</span><span class="plain-syntax"> *</span><span class="identifier-syntax">prep</span><span class="plain-syntax"> =</span>
<span class="plain-syntax">            </span><a href="3-prp.html#SP6" class="function-link"><span class="function-syntax">Prepositions::make</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">present_participle</span><span class="plain-syntax">, </span><span class="identifier-syntax">unexpected_upper_casing_used</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">where</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-vrb.html#SP12" class="function-link"><span class="function-syntax">Verbs::add_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">copular_verb</span><span class="plain-syntax">, </span><span class="identifier-syntax">prep</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><a href="3-vm.html#SP6" class="function-link"><span class="function-syntax">VerbMeanings::indirected</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vi</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">), </span><span class="constant-syntax">SVO_FS_BIT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-vu.html#SP6">&#167;6</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. </b>Note that forms using the auxiliary "to be" are given meanings which indirect
to the meanings of the main verb: thus "Y is owned by X" is indirected to
the reversal of the meaning "X owns Y", and "X is owning Y" to the unreversed
meaning. Both forms are then internally implemented as prepositional forms
of "to be", which is convenient however dubious in linguistic terms.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::register_voices_of_verb</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::register_voices_of_verb</span></span>:<br/><a href="3-vu.html#SP6">&#167;6</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vc</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">voice</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vi</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">unexpected_upper_casing_used</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">priority</span><span class="plain-syntax">, </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">where</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">verb_tabulation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vt</span><span class="plain-syntax"> = &amp;(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">tabulations</span><span class="plain-syntax">[</span><span class="identifier-syntax">voice</span><span class="plain-syntax">]);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordAssemblages::nonempty</span><span class="plain-syntax">(</span><span class="identifier-syntax">vt</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">to_be_auxiliary</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">preposition</span><span class="plain-syntax"> *</span><span class="identifier-syntax">prep</span><span class="plain-syntax"> =</span>
<span class="plain-syntax">            </span><a href="3-prp.html#SP6" class="function-link"><span class="function-syntax">Prepositions::make</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vt</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">to_be_auxiliary</span><span class="plain-syntax">, </span><span class="identifier-syntax">unexpected_upper_casing_used</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">where</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-vrb.html#SP12" class="function-link"><span class="function-syntax">Verbs::add_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">copular_verb</span><span class="plain-syntax">, </span><span class="identifier-syntax">prep</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><a href="3-vm.html#SP6" class="function-link"><span class="function-syntax">VerbMeanings::indirected</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vi</span><span class="plain-syntax">, (</span><span class="identifier-syntax">voice</span><span class="plain-syntax"> == </span><span class="identifier-syntax">PASSIVE_VOICE</span><span class="plain-syntax">)?</span><span class="identifier-syntax">TRUE:FALSE</span><span class="plain-syntax">),</span>
<span class="plain-syntax">            </span><span class="constant-syntax">SVO_FS_BIT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-vu.html#SP7_1" class="named-paragraph-link"><span class="named-paragraph">Register usages</span><span class="named-paragraph-number">7.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP7_1" class="paragraph-anchor"></a><b>&#167;7.1. </b>The sequence of registration is important here, and it's done this way to
minimise false readings due to overlaps. We take future or other exotic
tenses (say, the French past historic) first; then the perfect tenses,
then the imperfect; within that, we take negated forms first, then positive;
within that, we take present before past tense; within that, we run through
the persons from 1PS to 3PP.
</p>

<p class="commentary">Moreover, we need to group together identical wordings, so that each is
registered only once, but with an accumulated grammatical usage marker.
For example, consider the regular English verb "to carry". Of the six present
tense active voice forms, only one &mdash; "carries" &mdash; uniquely identifies its
number and person (i.e., as third person singular); the other five are all
"carry". So we make two registrations, one with a <a href="1-sc.html#SP9" class="internal">grammatical_usage</a>
containing a single linguistic constant, the other with one containing five.
</p>

<p class="commentary">We do this by accumulating a to-do list of forms we are interested in &mdash;
callback functions can tell us to ignore certain forms &mdash; and the worst-case
scenario is if every imaginable form is different, so the to-do list needs
to be this long just in case:
</p>

<pre class="definitions code-font"><span class="definition-keyword">define</span> <span class="constant-syntax">MAX_POSSIBLE_VERB_USAGES</span><span class="plain-syntax"> </span><span class="identifier-syntax">NO_KNOWN_NUMBERS</span><span class="plain-syntax">*</span><span class="identifier-syntax">NO_KNOWN_PERSONS</span><span class="plain-syntax">*</span><span class="identifier-syntax">NO_KNOWN_TENSES</span><span class="plain-syntax">*</span><span class="identifier-syntax">NO_KNOWN_SENSES</span>
</pre>
<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Register usages</span><span class="named-paragraph-number">7.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">to_do</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">,</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">lcons_to_do</span><span class="plain-syntax">[</span><span class="constant-syntax">MAX_POSSIBLE_VERB_USAGES</span><span class="plain-syntax">],</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">priorities_to_do</span><span class="plain-syntax">[</span><span class="constant-syntax">MAX_POSSIBLE_VERB_USAGES</span><span class="plain-syntax">],</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">copular_marker</span><span class="plain-syntax">[</span><span class="constant-syntax">MAX_POSSIBLE_VERB_USAGES</span><span class="plain-syntax">],</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">done</span><span class="plain-syntax">[</span><span class="constant-syntax">MAX_POSSIBLE_VERB_USAGES</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">word_assemblage</span><span class="plain-syntax"> </span><span class="identifier-syntax">wa_to_do</span><span class="plain-syntax">[</span><span class="constant-syntax">MAX_POSSIBLE_VERB_USAGES</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">tense</span><span class="plain-syntax"> = </span><span class="identifier-syntax">WILLBE_TENSE</span><span class="plain-syntax">; </span><span class="identifier-syntax">tense</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">NO_KNOWN_TENSES</span><span class="plain-syntax">; </span><span class="identifier-syntax">tense</span><span class="plain-syntax">++)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">sense</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="identifier-syntax">sense</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="identifier-syntax">sense</span><span class="plain-syntax">--)</span>
<span class="plain-syntax">            </span><span class="named-paragraph-container code-font"><a href="3-vu.html#SP7_1_2" class="named-paragraph-link"><span class="named-paragraph">Make to-do list of usages in this combination</span><span class="named-paragraph-number">7.1.2</span></a></span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">t1</span><span class="plain-syntax"> = </span><span class="identifier-syntax">HASBEEN_TENSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">t2</span><span class="plain-syntax"> = </span><span class="identifier-syntax">HADBEEN_TENSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-vu.html#SP7_1_1" class="named-paragraph-link"><span class="named-paragraph">Make to-do list of usages in these tenses</span><span class="named-paragraph-number">7.1.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">t1</span><span class="plain-syntax"> = </span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">; </span><span class="identifier-syntax">t2</span><span class="plain-syntax"> = </span><span class="identifier-syntax">WAS_TENSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-vu.html#SP7_1_1" class="named-paragraph-link"><span class="named-paragraph">Make to-do list of usages in these tenses</span><span class="named-paragraph-number">7.1.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-vu.html#SP7_1_3" class="named-paragraph-link"><span class="named-paragraph">Register each equivalence class of to-do list entries</span><span class="named-paragraph-number">7.1.3</span></a></span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-vu.html#SP7">&#167;7</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP7_1_1" class="paragraph-anchor"></a><b>&#167;7.1.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Make to-do list of usages in these tenses</span><span class="named-paragraph-number">7.1.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">sense</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="identifier-syntax">sense</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="identifier-syntax">sense</span><span class="plain-syntax">--) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">tense</span><span class="plain-syntax"> = </span><span class="identifier-syntax">t1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="3-vu.html#SP7_1_2" class="named-paragraph-link"><span class="named-paragraph">Make to-do list of usages in this combination</span><span class="named-paragraph-number">7.1.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">tense</span><span class="plain-syntax"> = </span><span class="identifier-syntax">t2</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="3-vu.html#SP7_1_2" class="named-paragraph-link"><span class="named-paragraph">Make to-do list of usages in this combination</span><span class="named-paragraph-number">7.1.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-vu.html#SP7_1">&#167;7.1</a> (twice).</li></ul>
<p class="commentary firstcommentary"><a id="SP7_1_2" class="paragraph-anchor"></a><b>&#167;7.1.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Make to-do list of usages in this combination</span><span class="named-paragraph-number">7.1.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">number</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="identifier-syntax">number</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">NO_KNOWN_NUMBERS</span><span class="plain-syntax">; </span><span class="identifier-syntax">number</span><span class="plain-syntax">++)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">person</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="identifier-syntax">person</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">NO_KNOWN_PERSONS</span><span class="plain-syntax">; </span><span class="identifier-syntax">person</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">p</span><span class="plain-syntax"> = </span><span class="identifier-syntax">priority</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            #</span><span class="identifier-syntax">ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">ALLOW_VERB_IN_ASSERTIONS_LINGUISTICS_CALLBACK</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ALLOW_VERB_IN_ASSERTIONS_LINGUISTICS_CALLBACK</span><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">, </span><span class="identifier-syntax">tense</span><span class="plain-syntax">, </span><span class="identifier-syntax">sense</span><span class="plain-syntax">, </span><span class="identifier-syntax">person</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="identifier-syntax">p</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            #</span><span class="reserved-syntax">else</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-vu.html#SP8" class="function-link"><span class="function-syntax">VerbUsages::allow_in_assertions</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">, </span><span class="identifier-syntax">tense</span><span class="plain-syntax">, </span><span class="identifier-syntax">sense</span><span class="plain-syntax">, </span><span class="identifier-syntax">person</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="identifier-syntax">p</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            #</span><span class="identifier-syntax">endif</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">p</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                #</span><span class="identifier-syntax">ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">ALLOW_VERB_LINGUISTICS_CALLBACK</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ALLOW_VERB_LINGUISTICS_CALLBACK</span><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">, </span><span class="identifier-syntax">tense</span><span class="plain-syntax">, </span><span class="identifier-syntax">sense</span><span class="plain-syntax">, </span><span class="identifier-syntax">person</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="identifier-syntax">p</span><span class="plain-syntax"> = -1;</span>
<span class="plain-syntax">                #</span><span class="reserved-syntax">else</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-vu.html#SP9" class="function-link"><span class="function-syntax">VerbUsages::allow_generally</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">, </span><span class="identifier-syntax">tense</span><span class="plain-syntax">, </span><span class="identifier-syntax">sense</span><span class="plain-syntax">, </span><span class="identifier-syntax">person</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="identifier-syntax">p</span><span class="plain-syntax"> = -1;</span>
<span class="plain-syntax">                #</span><span class="identifier-syntax">endif</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">p</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="3-vu.html#SP7_1_2_1" class="named-paragraph-link"><span class="named-paragraph">Add this form to the to-do list</span><span class="named-paragraph-number">7.1.2.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-vu.html#SP7_1">&#167;7.1</a> and <a href="3-vu.html#SP7_1_1">&#167;7.1.1</a> (twice).</li></ul>
<p class="commentary firstcommentary"><a id="SP7_1_2_1" class="paragraph-anchor"></a><b>&#167;7.1.2.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Add this form to the to-do list</span><span class="named-paragraph-number">7.1.2.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">lcon_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">l</span><span class="plain-syntax"> = </span><a href="3-vrb.html#SP2" class="function-link"><span class="function-syntax">Verbs::to_lcon</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vi</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">l</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Lcon::set_voice</span><span class="plain-syntax">(</span><span class="identifier-syntax">l</span><span class="plain-syntax">, </span><span class="identifier-syntax">voice</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">l</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Lcon::set_tense</span><span class="plain-syntax">(</span><span class="identifier-syntax">l</span><span class="plain-syntax">, </span><span class="identifier-syntax">tense</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">l</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Lcon::set_sense</span><span class="plain-syntax">(</span><span class="identifier-syntax">l</span><span class="plain-syntax">, </span><span class="identifier-syntax">sense</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">l</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Lcon::set_person</span><span class="plain-syntax">(</span><span class="identifier-syntax">l</span><span class="plain-syntax">, </span><span class="identifier-syntax">person</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">l</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Lcon::set_number</span><span class="plain-syntax">(</span><span class="identifier-syntax">l</span><span class="plain-syntax">, </span><span class="identifier-syntax">number</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">lcons_to_do</span><span class="plain-syntax">[</span><span class="identifier-syntax">to_do</span><span class="plain-syntax">] = </span><span class="identifier-syntax">l</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">priorities_to_do</span><span class="plain-syntax">[</span><span class="identifier-syntax">to_do</span><span class="plain-syntax">] = </span><span class="identifier-syntax">p</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">done</span><span class="plain-syntax">[</span><span class="identifier-syntax">to_do</span><span class="plain-syntax">] = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">wa_to_do</span><span class="plain-syntax">[</span><span class="identifier-syntax">to_do</span><span class="plain-syntax">] = </span><span class="identifier-syntax">vt</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">vc_text</span><span class="plain-syntax">[</span><span class="identifier-syntax">tense</span><span class="plain-syntax">][</span><span class="identifier-syntax">sense</span><span class="plain-syntax">][</span><span class="identifier-syntax">person</span><span class="plain-syntax">][</span><span class="identifier-syntax">number</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">copular_marker</span><span class="plain-syntax">[</span><span class="identifier-syntax">to_do</span><span class="plain-syntax">] = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vi</span><span class="plain-syntax"> == </span><span class="identifier-syntax">copular_verb</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">tense</span><span class="plain-syntax"> == </span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">person</span><span class="plain-syntax"> == </span><span class="identifier-syntax">THIRD_PERSON</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">number</span><span class="plain-syntax"> == </span><span class="identifier-syntax">SINGULAR_NUMBER</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">sense</span><span class="plain-syntax"> == </span><span class="constant-syntax">1</span><span class="plain-syntax">) </span><span class="identifier-syntax">copular_marker</span><span class="plain-syntax">[</span><span class="identifier-syntax">to_do</span><span class="plain-syntax">] = -1;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">copular_marker</span><span class="plain-syntax">[</span><span class="identifier-syntax">to_do</span><span class="plain-syntax">] = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">to_do</span><span class="plain-syntax">++;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-vu.html#SP7_1_2">&#167;7.1.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP7_1_3" class="paragraph-anchor"></a><b>&#167;7.1.3. </b>Two entries on the to-do list are "equivalent" if they have the same wording.
For example, "carry" first person singular present tense is equivalent to
the same thing in the second person, and so on. The priority for an equivalence
class is the maximum priority for any of its members; this ensures, for example,
that "carry" (1ps) which has priority 0 will not hold back "carry" (3pp) which
needs to have priority 1.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Register each equivalence class of to-do list entries</span><span class="named-paragraph-number">7.1.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">to_do</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">done</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">] == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">max_priority</span><span class="plain-syntax"> = -1;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">grammatical_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">gu</span><span class="plain-syntax"> = </span><a href="1-sc.html#SP9" class="function-link"><span class="function-syntax">Stock::new_usage</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vi</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">in_stock</span><span class="plain-syntax">, </span><span class="identifier-syntax">DefaultLanguage::get</span><span class="plain-syntax">(</span><span class="identifier-syntax">NULL</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">j</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">j</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">to_do</span><span class="plain-syntax">; </span><span class="identifier-syntax">j</span><span class="plain-syntax">++)</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordAssemblages::eq</span><span class="plain-syntax">(&amp;(</span><span class="identifier-syntax">wa_to_do</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">]), &amp;(</span><span class="identifier-syntax">wa_to_do</span><span class="plain-syntax">[</span><span class="identifier-syntax">j</span><span class="plain-syntax">]))) {</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">done</span><span class="plain-syntax">[</span><span class="identifier-syntax">j</span><span class="plain-syntax">] = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><a href="1-sc.html#SP9" class="function-link"><span class="function-syntax">Stock::add_form_to_usage</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">gu</span><span class="plain-syntax">, </span><span class="identifier-syntax">lcons_to_do</span><span class="plain-syntax">[</span><span class="identifier-syntax">j</span><span class="plain-syntax">]);</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">priorities_to_do</span><span class="plain-syntax">[</span><span class="identifier-syntax">j</span><span class="plain-syntax">] &gt; </span><span class="identifier-syntax">max_priority</span><span class="plain-syntax">) </span><span class="identifier-syntax">max_priority</span><span class="plain-syntax"> = </span><span class="identifier-syntax">priorities_to_do</span><span class="plain-syntax">[</span><span class="identifier-syntax">j</span><span class="plain-syntax">];</span>
<span class="plain-syntax">                }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP5" class="function-link"><span class="function-syntax">VerbUsages::new</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">wa_to_do</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">],</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">unexpected_upper_casing_used</span><span class="plain-syntax">, </span><span class="identifier-syntax">gu</span><span class="plain-syntax">, </span><span class="identifier-syntax">where</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) </span><a href="3-vu.html#SP10" class="function-link"><span class="function-syntax">VerbUsages::set_search_priority</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">, </span><span class="identifier-syntax">max_priority</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">copular_marker</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">] == </span><span class="constant-syntax">1</span><span class="plain-syntax">) </span><span class="identifier-syntax">regular_to_be</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">copular_marker</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">] == -1) </span><span class="identifier-syntax">negated_to_be</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-vu.html#SP7_1">&#167;7.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP8" class="paragraph-anchor"></a><b>&#167;8. </b>Here are the default decisions on what usages are allowed; the defaults are
what are used by Inform. In assertions:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::allow_in_assertions</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::allow_in_assertions</span></span>:<br/><a href="3-vu.html#SP7_1_2">&#167;7.1.2</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vc</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">tense</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">sense</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">person</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">tense</span><span class="plain-syntax"> == </span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">sense</span><span class="plain-syntax"> == </span><span class="identifier-syntax">POSITIVE_SENSE</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">person</span><span class="plain-syntax"> == </span><span class="identifier-syntax">THIRD_PERSON</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP9" class="paragraph-anchor"></a><b>&#167;9. </b>And in other usages (e.g., in Inform's "now the pink door is not open"):
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::allow_generally</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::allow_generally</span></span>:<br/><a href="3-vu.html#SP7_1_2">&#167;7.1.2</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vc</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">tense</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">sense</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">person</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (((</span><span class="identifier-syntax">tense</span><span class="plain-syntax"> == </span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">tense</span><span class="plain-syntax"> == </span><span class="identifier-syntax">WAS_TENSE</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">tense</span><span class="plain-syntax"> == </span><span class="identifier-syntax">HASBEEN_TENSE</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">tense</span><span class="plain-syntax"> == </span><span class="identifier-syntax">HADBEEN_TENSE</span><span class="plain-syntax">)) &amp;&amp;</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">person</span><span class="plain-syntax"> == </span><span class="identifier-syntax">THIRD_PERSON</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP10" class="paragraph-anchor"></a><b>&#167;10. </b>That just leaves the business of setting the "priority" of a usage. As
noted above, priority 0 usages are ignored, while otherwise low numbers
beat high ones.
</p>

<p class="commentary">We must add the new usage to the tier with the given priority, creating
that tier if need be. Newly created tiers are insertion-sorted into a
list, with lower priority numbers before higher ones.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::set_search_priority</span><button class="popup" onclick="togglePopup('usagePopup6')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup6">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::set_search_priority</span></span>:<br/><a href="3-vu.html#SP7_1_3">&#167;7.1.3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">p</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_usage_tier</span><span class="plain-syntax"> *</span><span class="identifier-syntax">tier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">first_search_tier</span><span class="plain-syntax">, *</span><span class="identifier-syntax">last_tier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">VERB_USAGES</span><span class="plain-syntax">, </span><span class="string-syntax">"Usage '%A' has priority %d\n"</span><span class="plain-syntax">, &amp;(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">vu_text</span><span class="plain-syntax">), </span><span class="identifier-syntax">p</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">tier</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">tier</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">priority</span><span class="plain-syntax"> &lt;= </span><span class="identifier-syntax">p</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">tier</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">priority</span><span class="plain-syntax"> == </span><span class="identifier-syntax">p</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><a href="3-vu.html#SP10" class="function-link"><span class="function-syntax">VerbUsages::add_to_tier</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">, </span><span class="identifier-syntax">tier</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">last_tier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">tier</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">tier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">tier</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_tier</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">tier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CREATE</span><span class="plain-syntax">(</span><span class="reserved-syntax">verb_usage_tier</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">tier</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">priority</span><span class="plain-syntax"> = </span><span class="identifier-syntax">p</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">tier</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">tier_contents</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="3-vu.html#SP10" class="function-link"><span class="function-syntax">VerbUsages::add_to_tier</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">, </span><span class="identifier-syntax">tier</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">last_tier</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">tier</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_tier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">last_tier</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_tier</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">last_tier</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_tier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">tier</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">tier</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_tier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">first_search_tier</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">first_search_tier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">tier</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::add_to_tier</span><span class="plain-syntax">(</span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">, </span><span class="reserved-syntax">verb_usage_tier</span><span class="plain-syntax"> *</span><span class="identifier-syntax">tier</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">known</span><span class="plain-syntax"> = </span><span class="identifier-syntax">tier</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">tier_contents</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">known</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">known</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_within_tier</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">known</span><span class="plain-syntax"> = </span><span class="identifier-syntax">known</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_within_tier</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">known</span><span class="plain-syntax">) </span><span class="identifier-syntax">known</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_within_tier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">tier</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">tier_contents</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_within_tier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP11" class="paragraph-anchor"></a><b>&#167;11. Miscellaneous utility routines.</b>A usage is "foreign" if it belongs to a language other than English:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::is_foreign</span><span class="plain-syntax">(</span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb</span><span class="plain-syntax"> *</span><span class="identifier-syntax">v</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP12" class="function-link"><span class="function-syntax">VerbUsages::get_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">v</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">v</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">conjugation</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">defined_in</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">v</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">conjugation</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">defined_in</span><span class="plain-syntax"> != </span><span class="identifier-syntax">DefaultLanguage::get</span><span class="plain-syntax">(</span><span class="identifier-syntax">NULL</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP12" class="paragraph-anchor"></a><b>&#167;12. </b>And some access routines.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="constant-syntax">VERB_MEANING_LINGUISTICS_TYPE</span><span class="plain-syntax"> *</span><span class="function-syntax">VerbUsages::get_regular_meaning</span><button class="popup" onclick="togglePopup('usagePopup7')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup7">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::get_regular_meaning</span></span>:<br/><a href="3-vu.html#SP18">&#167;18</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">, </span><span class="reserved-syntax">preposition</span><span class="plain-syntax"> *</span><span class="identifier-syntax">prep</span><span class="plain-syntax">, </span><span class="reserved-syntax">preposition</span><span class="plain-syntax"> *</span><span class="identifier-syntax">second_prep</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vu</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="constant-syntax">VERB_MEANING_LINGUISTICS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">root</span><span class="plain-syntax"> = </span><a href="3-vm.html#SP9" class="function-link"><span class="function-syntax">VerbMeanings::get_regular_meaning_of_form</span></a><span class="plain-syntax">(</span><a href="3-vrb.html#SP11" class="function-link"><span class="function-syntax">Verbs::find_form</span></a><span class="plain-syntax">(</span><a href="3-vu.html#SP12" class="function-link"><span class="function-syntax">VerbUsages::get_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">), </span><span class="identifier-syntax">prep</span><span class="plain-syntax">, </span><span class="identifier-syntax">second_prep</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">root</span><span class="plain-syntax">) &amp;&amp; (</span><a href="3-vu.html#SP12" class="function-link"><span class="function-syntax">VerbUsages::get_voice</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) == </span><span class="identifier-syntax">PASSIVE_VOICE</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">root</span><span class="plain-syntax"> != </span><span class="identifier-syntax">VERB_MEANING_EQUALITY</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">root</span><span class="plain-syntax"> = </span><a href="3-vm.html#SP2" class="function-link"><span class="function-syntax">VerbMeanings::reverse_VMT</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">root</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">root</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">verb</span><span class="plain-syntax"> *</span><span class="function-syntax">VerbUsages::get_verb</span><button class="popup" onclick="togglePopup('usagePopup8')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup8">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::get_verb</span></span>:<br/><a href="3-vu.html#SP2">&#167;2</a>, <a href="3-vu.html#SP11">&#167;11</a>, <a href="3-vu.html#SP15">&#167;15</a>, <a href="3-vu.html#SP16">&#167;16</a>, <a href="3-vu.html#SP17">&#167;17</a><br/>Verb Phrases - <a href="4-vp.html#SP5_3_1_1_1">&#167;5.3.1.1.1</a>, <a href="4-vp.html#SP8">&#167;8</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-vrb.html#SP2" class="function-link"><span class="function-syntax">Verbs::from_lcon</span></a><span class="plain-syntax">(</span><a href="1-sc.html#SP9" class="function-link"><span class="function-syntax">Stock::first_form_in_usage</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">usage</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::get_voice</span><span class="plain-syntax">(</span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Lcon::get_voice</span><span class="plain-syntax">(</span><a href="1-sc.html#SP9" class="function-link"><span class="function-syntax">Stock::first_form_in_usage</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">usage</span><span class="plain-syntax">));</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::get_tense_used</span><button class="popup" onclick="togglePopup('usagePopup9')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup9">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::get_tense_used</span></span>:<br/><a href="3-vu.html#SP17">&#167;17</a>, <a href="3-vu.html#SP20">&#167;20</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">Lcon::get_tense</span><span class="plain-syntax">(</span><a href="1-sc.html#SP9" class="function-link"><span class="function-syntax">Stock::first_form_in_usage</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">usage</span><span class="plain-syntax">));</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::is_used_negatively</span><button class="popup" onclick="togglePopup('usagePopup10')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup10">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::is_used_negatively</span></span>:<br/><a href="3-vu.html#SP17">&#167;17</a>, <a href="3-vu.html#SP19">&#167;19</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Lcon::get_sense</span><span class="plain-syntax">(</span><a href="1-sc.html#SP9" class="function-link"><span class="function-syntax">Stock::first_form_in_usage</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">usage</span><span class="plain-syntax">)) == </span><span class="identifier-syntax">NEGATIVE_SENSE</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP13" class="paragraph-anchor"></a><b>&#167;13. Parsing source text against verb usages.</b>Given a particular VU, and a word range <span class="extract"><span class="extract-syntax">w1</span></span> to <span class="extract"><span class="extract-syntax">w2</span></span>, we test whether the
range begins with but does not consist only of the text of the VU. We return
the first word after the VU text if it does (which will therefore be a
word number still inside the range), or \(-1\) if it doesn't.
</p>

<p class="commentary">It is potentially quite slow to test every word against every possible verb,
even though there are typically fairly few verbs in the S-grammar, so we
confine ourselves to words flagged in the vocabulary as being used in verbs.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::parse_against_verb</span><button class="popup" onclick="togglePopup('usagePopup11')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup11">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::parse_against_verb</span></span>:<br/><a href="3-vu.html#SP15">&#167;15</a>, <a href="3-vu.html#SP16">&#167;16</a>, <a href="3-vu.html#SP17">&#167;17</a>, <a href="3-vu.html#SP18">&#167;18</a>, <a href="3-vu.html#SP19">&#167;19</a>, <a href="3-vu.html#SP20">&#167;20</a><br/>Verb Phrases - <a href="4-vp.html#SP5_3_1_1_1">&#167;5.3.1.1.1</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">vu_allow_unexpected_upper_case</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">Word::unexpectedly_upper_case</span><span class="plain-syntax">(</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)))) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> -1;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">WordAssemblages::parse_as_strictly_initial_text</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, &amp;(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">vu_text</span><span class="plain-syntax">));</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP14" class="paragraph-anchor"></a><b>&#167;14. </b>The "permitted verb" is just a piece of temporary context used in parsing:
it's convenient for the verb currently being considered to be stored in
a global variable.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">verb</span><span class="plain-syntax"> *</span><span class="identifier-syntax">permitted_verb</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP15" class="paragraph-anchor"></a><b>&#167;15. </b>We now define a whole run of internals to parse verbs. As examples,
</p>

<blockquote>
    <p>is</p>
</blockquote>

<blockquote>
    <p>has not been</p>
</blockquote>

<blockquote>
    <p>was carried by</p>
</blockquote>

<p class="commentary">are all, in the sense we mean it here, "verbs".
</p>

<p class="commentary">We never match a verb if it is unexpectedly given in upper case form. Thus
"The Glory That Is Rome is a room" will be read as "(The Glory That Is
Rome) is (a room)", not "(The Glory That) is (Rome is a room)".
</p>

<p class="commentary">The following picks up any verb which can be used in an SVO sentence and
which has a meaning.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;nonimperative-verb&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span><span class="plain-syntax"> ?</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER_USAGES</span><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">verb</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vi</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP12" class="function-link"><span class="function-syntax">VerbUsages::get_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">verb_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vf</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vi</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">first_form</span><span class="plain-syntax">; </span><span class="identifier-syntax">vf</span><span class="plain-syntax">; </span><span class="identifier-syntax">vf</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vf</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_form</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><a href="3-vm.html#SP4" class="function-link"><span class="function-syntax">VerbMeanings::is_meaningless</span></a><span class="plain-syntax">(&amp;(</span><span class="identifier-syntax">vf</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">list_of_senses</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">vm</span><span class="plain-syntax">)) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">                (</span><span class="identifier-syntax">vf</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">form_structures</span><span class="plain-syntax"> &amp; (</span><span class="constant-syntax">SVO_FS_BIT</span><span class="plain-syntax"> + </span><span class="identifier-syntax">SVOO_FS_BIT</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP13" class="function-link"><span class="function-syntax">VerbUsages::parse_against_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">vu</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">i</span><span class="plain-syntax">&gt;</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) &amp;&amp; (</span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;=</span><span class="identifier-syntax">Wordings::last_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">vf</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">preposition</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">                        (</span><span class="identifier-syntax">WordAssemblages::is_at</span><span class="plain-syntax">(&amp;(</span><span class="identifier-syntax">vf</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">preposition</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">prep_text</span><span class="plain-syntax">), </span><span class="identifier-syntax">i</span><span class="plain-syntax">, </span><span class="identifier-syntax">Wordings::last_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)))) {</span>
<span class="plain-syntax">                        ==&gt; { -, </span><span class="identifier-syntax">vu</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">permitted_verb</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP12" class="function-link"><span class="function-syntax">VerbUsages::get_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">-1;</span>
<span class="plain-syntax">                    }</span>
<span class="plain-syntax">                }</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP16" class="paragraph-anchor"></a><b>&#167;16. </b>A copular verb is one which implies the equality relation: in practice,
that means it's "to be". So the following matches "is", "were not",
and so on.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;copular-verb&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span><span class="plain-syntax"> ?</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">preform_backtrack</span><span class="plain-syntax">) { </span><span class="identifier-syntax">vu</span><span class="plain-syntax"> = </span><span class="identifier-syntax">preform_backtrack</span><span class="plain-syntax">; </span><span class="reserved-syntax">goto</span><span class="plain-syntax"> </span><span class="identifier-syntax">BacktrackFrom</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER_USAGES</span><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-vu.html#SP12" class="function-link"><span class="function-syntax">VerbUsages::get_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) == </span><span class="identifier-syntax">copular_verb</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP13" class="function-link"><span class="function-syntax">VerbUsages::parse_against_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">vu</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">i</span><span class="plain-syntax">&gt;</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) &amp;&amp; (</span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;=</span><span class="identifier-syntax">Wordings::last_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">                ==&gt; { -, </span><span class="identifier-syntax">vu</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> -(</span><span class="identifier-syntax">i</span><span class="plain-syntax">-1);</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">BacktrackFrom:</span><span class="plain-syntax"> ;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP17" class="paragraph-anchor"></a><b>&#167;17. </b>A noncopular verb is anything that isn't copular, but here we also require
it to be in the present tense and the negative sense. So, for example, "does
not carry" qualifies; "is not" or "supports" don't qualify.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;negated-noncopular-verb-present&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span><span class="plain-syntax"> ?</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">preform_backtrack</span><span class="plain-syntax">) { </span><span class="identifier-syntax">vu</span><span class="plain-syntax"> = </span><span class="identifier-syntax">preform_backtrack</span><span class="plain-syntax">; </span><span class="reserved-syntax">goto</span><span class="plain-syntax"> </span><span class="identifier-syntax">BacktrackFrom</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER_USAGES</span><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><a href="3-vu.html#SP12" class="function-link"><span class="function-syntax">VerbUsages::get_tense_used</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) == </span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">            (</span><a href="3-vu.html#SP12" class="function-link"><span class="function-syntax">VerbUsages::get_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) != </span><span class="identifier-syntax">copular_verb</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">            (</span><a href="3-vu.html#SP12" class="function-link"><span class="function-syntax">VerbUsages::is_used_negatively</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP13" class="function-link"><span class="function-syntax">VerbUsages::parse_against_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">vu</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">i</span><span class="plain-syntax">&gt;</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) &amp;&amp; (</span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;=</span><span class="identifier-syntax">Wordings::last_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">                ==&gt; { -, </span><span class="identifier-syntax">vu</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> -(</span><span class="identifier-syntax">i</span><span class="plain-syntax">-1);</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">BacktrackFrom:</span><span class="plain-syntax"> ;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP18" class="paragraph-anchor"></a><b>&#167;18. </b>A universal verb is one which implies the universal relation: in Inform,
that means it's "to relate".
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;universal-verb&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span><span class="plain-syntax"> ?</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">VERB_MEANING_UNIVERSAL_CALCULUS_RELATION</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER_USAGES</span><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-vu.html#SP12" class="function-link"><span class="function-syntax">VerbUsages::get_regular_meaning</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) == </span><span class="identifier-syntax">VERB_MEANING_UNIVERSAL_CALCULUS_RELATION</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP13" class="function-link"><span class="function-syntax">VerbUsages::parse_against_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">vu</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">i</span><span class="plain-syntax">&gt;</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) &amp;&amp; (</span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;=</span><span class="identifier-syntax">Wordings::last_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">                ==&gt; { -, </span><span class="identifier-syntax">vu</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">-1;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">endif</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP19" class="paragraph-anchor"></a><b>&#167;19. </b>Any verb usage which is negative in sense: this is used only to diagnose problems.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;negated-verb&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span><span class="plain-syntax"> ?</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">preform_backtrack</span><span class="plain-syntax">) { </span><span class="identifier-syntax">vu</span><span class="plain-syntax"> = </span><span class="identifier-syntax">preform_backtrack</span><span class="plain-syntax">; </span><span class="reserved-syntax">goto</span><span class="plain-syntax"> </span><span class="identifier-syntax">BacktrackFrom</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER_USAGES</span><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-vu.html#SP12" class="function-link"><span class="function-syntax">VerbUsages::is_used_negatively</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP13" class="function-link"><span class="function-syntax">VerbUsages::parse_against_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">vu</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">i</span><span class="plain-syntax">&gt;</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) &amp;&amp; (</span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;=</span><span class="identifier-syntax">Wordings::last_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">                ==&gt; { -, </span><span class="identifier-syntax">vu</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> -(</span><span class="identifier-syntax">i</span><span class="plain-syntax">-1);</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">BacktrackFrom:</span><span class="plain-syntax"> ;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP20" class="paragraph-anchor"></a><b>&#167;20. </b>Any verb usage which is in the past tense: this is used only to diagnose problems.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;past-tense-verb&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span><span class="plain-syntax"> ?</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_usage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vu</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">preform_backtrack</span><span class="plain-syntax">) { </span><span class="identifier-syntax">vu</span><span class="plain-syntax"> = </span><span class="identifier-syntax">preform_backtrack</span><span class="plain-syntax">; </span><span class="reserved-syntax">goto</span><span class="plain-syntax"> </span><span class="identifier-syntax">BacktrackFrom</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER_USAGES</span><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-vu.html#SP12" class="function-link"><span class="function-syntax">VerbUsages::get_tense_used</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vu</span><span class="plain-syntax">) != </span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP13" class="function-link"><span class="function-syntax">VerbUsages::parse_against_verb</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">vu</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">i</span><span class="plain-syntax">&gt;</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) &amp;&amp; (</span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;=</span><span class="identifier-syntax">Wordings::last_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">                ==&gt; { -, </span><span class="identifier-syntax">vu</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax"> -(</span><span class="identifier-syntax">i</span><span class="plain-syntax">-1);</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">BacktrackFrom:</span><span class="plain-syntax"> ;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP21" class="paragraph-anchor"></a><b>&#167;21. </b>The following are used only when recognising text expansions for adaptive
uses of verbs:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;adaptive-verb&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vc</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">, </span><span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">auxiliary_only</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">p</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP24" class="function-link"><span class="function-syntax">VerbUsages::adaptive_person</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">defined_in</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">n</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP24" class="function-link"><span class="function-syntax">VerbUsages::adaptive_number</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">defined_in</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">word_assemblage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">we_form</span><span class="plain-syntax"> = &amp;(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">tabulations</span><span class="plain-syntax">[</span><span class="identifier-syntax">ACTIVE_VOICE</span><span class="plain-syntax">].</span><span class="identifier-syntax">vc_text</span><span class="plain-syntax">[</span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">][</span><span class="identifier-syntax">POSITIVE_SENSE</span><span class="plain-syntax">][</span><span class="identifier-syntax">p</span><span class="plain-syntax">][</span><span class="identifier-syntax">n</span><span class="plain-syntax">]);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">word_assemblage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">we_dont_form</span><span class="plain-syntax"> = &amp;(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">tabulations</span><span class="plain-syntax">[</span><span class="identifier-syntax">ACTIVE_VOICE</span><span class="plain-syntax">].</span><span class="identifier-syntax">vc_text</span><span class="plain-syntax">[</span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">][</span><span class="identifier-syntax">NEGATIVE_SENSE</span><span class="plain-syntax">][</span><span class="identifier-syntax">p</span><span class="plain-syntax">][</span><span class="identifier-syntax">n</span><span class="plain-syntax">]);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordAssemblages::compare_with_wording</span><span class="plain-syntax">(</span><span class="identifier-syntax">we_form</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                ==&gt; { </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">vc</span><span class="plain-syntax"> }; </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordAssemblages::compare_with_wording</span><span class="plain-syntax">(</span><span class="identifier-syntax">we_dont_form</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                ==&gt; { </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">, </span><span class="identifier-syntax">vc</span><span class="plain-syntax"> }; </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>

<span class="function-syntax">&lt;adaptive-verb-infinitive&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vc</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">, </span><span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">auxiliary_only</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">word_assemblage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">infinitive_form</span><span class="plain-syntax"> = &amp;(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">infinitive</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordAssemblages::compare_with_wording</span><span class="plain-syntax">(</span><span class="identifier-syntax">infinitive_form</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                ==&gt; { </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">vc</span><span class="plain-syntax"> }; </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP22" class="paragraph-anchor"></a><b>&#167;22. </b>These three nonterminals are used by Inform only to recognise constant
names for verbs. For example, the parsing of the Inform constants "the verb take"
or "the verb to be able to see" use these.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;instance-of-verb&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vf</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">vf</span><span class="plain-syntax">, </span><span class="reserved-syntax">verb_form</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vc</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vf</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">underlying_verb</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">conjugation</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">vc</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">auxiliary_only</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">instance_of_verb</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordAssemblages::compare_with_wording</span><span class="plain-syntax">(&amp;(</span><span class="identifier-syntax">vf</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">pos_reference_text</span><span class="plain-syntax">), </span><span class="identifier-syntax">W</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                ==&gt; { </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">vf</span><span class="plain-syntax"> }; </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordAssemblages::compare_with_wording</span><span class="plain-syntax">(&amp;(</span><span class="identifier-syntax">vf</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">neg_reference_text</span><span class="plain-syntax">), </span><span class="identifier-syntax">W</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                ==&gt; { </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">, </span><span class="identifier-syntax">vf</span><span class="plain-syntax"> }; </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>

<span class="function-syntax">&lt;instance-of-infinitive-form&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vf</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">vf</span><span class="plain-syntax">, </span><span class="reserved-syntax">verb_form</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vc</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vf</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">underlying_verb</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">conjugation</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">vc</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">auxiliary_only</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">instance_of_verb</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordAssemblages::compare_with_wording</span><span class="plain-syntax">(&amp;(</span><span class="identifier-syntax">vf</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">infinitive_reference_text</span><span class="plain-syntax">), </span><span class="identifier-syntax">W</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                ==&gt; { </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">vf</span><span class="plain-syntax"> }; </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>

<span class="function-syntax">&lt;modal-verb&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vc</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">, </span><span class="identifier-syntax">verb_conjugation</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">auxiliary_only</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">p</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP24" class="function-link"><span class="function-syntax">VerbUsages::adaptive_person</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">defined_in</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">n</span><span class="plain-syntax"> = </span><a href="3-vu.html#SP24" class="function-link"><span class="function-syntax">VerbUsages::adaptive_number</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">defined_in</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">tabulations</span><span class="plain-syntax">[</span><span class="identifier-syntax">ACTIVE_VOICE</span><span class="plain-syntax">].</span><span class="identifier-syntax">modal_auxiliary_usage</span><span class="plain-syntax">[</span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">][</span><span class="identifier-syntax">POSITIVE_SENSE</span><span class="plain-syntax">][</span><span class="identifier-syntax">p</span><span class="plain-syntax">][</span><span class="identifier-syntax">n</span><span class="plain-syntax">] != </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">word_assemblage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">we_form</span><span class="plain-syntax"> = &amp;(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">tabulations</span><span class="plain-syntax">[</span><span class="identifier-syntax">ACTIVE_VOICE</span><span class="plain-syntax">].</span><span class="identifier-syntax">vc_text</span><span class="plain-syntax">[</span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">][</span><span class="identifier-syntax">POSITIVE_SENSE</span><span class="plain-syntax">][</span><span class="identifier-syntax">p</span><span class="plain-syntax">][</span><span class="identifier-syntax">n</span><span class="plain-syntax">]);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">word_assemblage</span><span class="plain-syntax"> *</span><span class="identifier-syntax">we_dont_form</span><span class="plain-syntax"> = &amp;(</span><span class="identifier-syntax">vc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">tabulations</span><span class="plain-syntax">[</span><span class="identifier-syntax">ACTIVE_VOICE</span><span class="plain-syntax">].</span><span class="identifier-syntax">vc_text</span><span class="plain-syntax">[</span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">][</span><span class="identifier-syntax">NEGATIVE_SENSE</span><span class="plain-syntax">][</span><span class="identifier-syntax">p</span><span class="plain-syntax">][</span><span class="identifier-syntax">n</span><span class="plain-syntax">]);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordAssemblages::compare_with_wording</span><span class="plain-syntax">(</span><span class="identifier-syntax">we_form</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                    ==&gt; { </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">vc</span><span class="plain-syntax"> }; </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                }</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordAssemblages::compare_with_wording</span><span class="plain-syntax">(</span><span class="identifier-syntax">we_dont_form</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                    ==&gt; { </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">, </span><span class="identifier-syntax">vc</span><span class="plain-syntax"> }; </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                }</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP23" class="paragraph-anchor"></a><b>&#167;23. Optimisation.</b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::mark_as_verb</span><button class="popup" onclick="togglePopup('usagePopup12')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup12">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::mark_as_verb</span></span>:<br/><a href="3-vu.html#SP5">&#167;5</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">vocabulary_entry</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ve</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NTI::mark_vocabulary</span><span class="plain-syntax">(</span><span class="identifier-syntax">ve</span><span class="plain-syntax">, </span><span class="function-syntax">&lt;nonimperative-verb&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NTI::mark_vocabulary</span><span class="plain-syntax">(</span><span class="identifier-syntax">ve</span><span class="plain-syntax">, </span><span class="function-syntax">&lt;copular-verb&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NTI::mark_vocabulary</span><span class="plain-syntax">(</span><span class="identifier-syntax">ve</span><span class="plain-syntax">, </span><span class="function-syntax">&lt;negated-noncopular-verb-present&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NTI::mark_vocabulary</span><span class="plain-syntax">(</span><span class="identifier-syntax">ve</span><span class="plain-syntax">, </span><span class="function-syntax">&lt;universal-verb&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NTI::mark_vocabulary</span><span class="plain-syntax">(</span><span class="identifier-syntax">ve</span><span class="plain-syntax">, </span><span class="function-syntax">&lt;negated-verb&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NTI::mark_vocabulary</span><span class="plain-syntax">(</span><span class="identifier-syntax">ve</span><span class="plain-syntax">, </span><span class="function-syntax">&lt;past-tense-verb&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::preform_optimiser</span><button class="popup" onclick="togglePopup('usagePopup13')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup13">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::preform_optimiser</span></span>:<br/>Linguistics Module - <a href="1-lm.html#SP4">&#167;4</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NTI::first_word_in_match_must_have_my_NTI_bit</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;nonimperative-verb&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NTI::first_word_in_match_must_have_my_NTI_bit</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;copular-verb&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NTI::first_word_in_match_must_have_my_NTI_bit</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;negated-noncopular-verb-present&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NTI::first_word_in_match_must_have_my_NTI_bit</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;universal-verb&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NTI::first_word_in_match_must_have_my_NTI_bit</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;negated-verb&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NTI::first_word_in_match_must_have_my_NTI_bit</span><span class="plain-syntax">(</span><span class="function-syntax">&lt;past-tense-verb&gt;</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP24" class="paragraph-anchor"></a><b>&#167;24. Adaptive person.</b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::adaptive_person</span><button class="popup" onclick="togglePopup('usagePopup14')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup14">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::adaptive_person</span></span>:<br/><a href="3-vu.html#SP21">&#167;21</a>, <a href="3-vu.html#SP22">&#167;22</a><br/>Verbs - <a href="3-vrb.html#SP12_1_1">&#167;12.1.1</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">NATURAL_LANGUAGE_WORDS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">X</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">ADAPTIVE_PERSON_LINGUISTICS_CALLBACK</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">N</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ADAPTIVE_PERSON_LINGUISTICS_CALLBACK</span><span class="plain-syntax">(</span><span class="identifier-syntax">X</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">N</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">N</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FIRST_PERSON</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">endif</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">ifndef</span><span class="plain-syntax"> </span><span class="identifier-syntax">ADAPTIVE_PERSON_LINGUISTICS_CALLBACK</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FIRST_PERSON</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">endif</span>
<span class="plain-syntax">}</span>
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">VerbUsages::adaptive_number</span><button class="popup" onclick="togglePopup('usagePopup15')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup15">Usage of <span class="code-font"><span class="function-syntax">VerbUsages::adaptive_number</span></span>:<br/><a href="3-vu.html#SP21">&#167;21</a>, <a href="3-vu.html#SP22">&#167;22</a><br/>Verbs - <a href="3-vrb.html#SP12_1_1">&#167;12.1.1</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">NATURAL_LANGUAGE_WORDS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">X</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">ADAPTIVE_NUMBER_LINGUISTICS_CALLBACK</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">N</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ADAPTIVE_NUMBER_LINGUISTICS_CALLBACK</span><span class="plain-syntax">(</span><span class="identifier-syntax">X</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">N</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">N</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">PLURAL_NUMBER</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">endif</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">ifndef</span><span class="plain-syntax"> </span><span class="identifier-syntax">ADAPTIVE_NUMBER_LINGUISTICS_CALLBACK</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">PLURAL_NUMBER</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">endif</span>
<span class="plain-syntax">}</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="3-sm.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-lm.html">1</a></li><li class="progresschapter"><a href="2-adj.html">2</a></li><li class="progresscurrentchapter">3</li><li class="progresssection"><a href="3-vrb.html">vrb</a></li><li class="progresssection"><a href="3-vm.html">vm</a></li><li class="progresssection"><a href="3-sm.html">sm</a></li><li class="progresscurrent">vu</li><li class="progresssection"><a href="3-prp.html">prp</a></li><li class="progresssection"><a href="3-aoc.html">aoc</a></li><li class="progresssection"><a href="3-apoo.html">apoo</a></li><li class="progresschapter"><a href="4-np.html">4</a></li><li class="progressnext"><a href="3-prp.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

